package com.aaa.springboot.config;



import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig  implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/file/**").addResourceLocations("file:D:/pic/file/");

    }

    /**
     * 隐藏的http方法过滤
     *
     * @return {@link HiddenHttpMethodFilter}
     */
  /*  @Bean
    public HiddenHttpMethodFilter hiddenHttpMethodFilter(){
        HiddenHttpMethodFilter hiddenHttpMethodFilter=new HiddenHttpMethodFilter();
        hiddenHttpMethodFilter.setMethodParam("_method");
        hiddenHttpMethodFilter.setBeanName("HiddenHttpMethodFilter");
        return  hiddenHttpMethodFilter;

    }
*/





}
